import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';

@Component({
	selector: 'm-checkbox',
	templateUrl: './checkbox.component.html',
	styleUrls: ['./checkbox.component.scss'],
})
export class CheckboxComponent implements OnInit {
	constructor() {}
	@Input() value: boolean;
	@Input() readonly: boolean;
	@Output() valueChange = new EventEmitter<boolean>();
	ngOnInit() {}

	change(event: Event) {
		this.value = !this.value;
		this.valueChange.emit(this.value);
	}
}
